<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta charset="UTF-8">
    <title>查看</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="../../static/css/font.css" th:href="@{/css/font.css}">
    <link rel="stylesheet" href="../../static/css/xadmin.css" th:href="@{/css/xadmin.css}">
    <script src="../../static/lib/layui/layui.js" charset="utf-8" th:src="@{/lib/layui/layui.js}"></script>
    <script type="text/javascript" src="../../static/js/xadmin.js" th:src="@{/js/xadmin.js}"></script>
    <style type="text/css">
        #img {
            width: 20%;
            height: 234px;
            border: 1px solid lightgray;
        }

        .remove-input-class {
            outline: none;
            border-style: none;
            background-color: white;
            text-shadow: none;
            box-shadow: none;
        }

        .layui-table td {
            text-align: center;
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">

                </div>
                <div class="layui-card-body">
                    <table class="layui-table layui-form">
                        <tbody th:if="${checkUser} != null" th:with="user=${checkUser}">
                        <tr>
                            <td width="15%">姓名</td>
                            <td th:text="${user.name != null}?${user.name}"></td>
                            <td width="10%">性别</td>
                            <td th:text="${user.gender != null}?${user.gender}"></td>
                            <td rowspan="6">
                                <img src="../images/1.jpg" th:src="${user.faceImage != null}?${user.faceImage}">

                            </td>
                        </tr>
                        <tr>
                            <td>出生日期</td>
                            <td th:text="${#dates.format(user.birthday,'yyyy-MM-dd HH:MM:SS')}"></td>
                            <td>民族</td>
                            <td th:text="${user.nation}"></td>

                        </tr>
                        <tr>
                            <td>文化程度</td>
                            <td th:text="${user.educationalLevel != null}?${user.educationalLevel}"></td>
                            <td>专业</td>
                            <td th:text="${user.major != null}?${user.major}"></td>
                        </tr>
                        <tr>
                            <td>身份证号</td>
                            <td th:text="${user.idCardNum != null}?${user.idCardNum}"></td>
                            <td>政治面貌</td>
                            <td th:text="${user.politicalStatus != null}?${user.politicalStatus}"></td>
                        </tr>
                        <tr>
                            <td>手机号码</td>
                            <td th:text="${user.phoneNum}"></td>
                            <td>电子邮箱</td>
                            <td th:text="${user.email}"></td>
                        </tr>
                        <tr>
                            <td>QQ号</td>
                            <td th:text="${user.qqNum}"></td>
                            <td>微信号</td>
                            <td th:text="${user.weChatNum}"></td>
                        </tr>
                        <tr>
                            <td>户籍所在地</td>
                            <td colspan="4" th:text="${user.province} + ${user.city} + ${user.district} + ${user.address}"></td>
                        </tr>
                        <tr>
                            <td>人员类别</td>
                            <td colspan="4" th:text="${user.userType.userTypeName}"></td>
                        </tr>
                        <tr>
                            <td>申请方式</td>
                            <td colspan="4"
                                th:text="${user.applicationMethod.applicationMethodName}"></td>
                        </tr>
                        <tr>
                            <td rowspan="3" colspan="2">学习培训经历</td>
                            <td rowspan="2">地方培训</td>
                            <td colspan="2">
                                <input th:value="${user.isAttendLocalTraining} ? '   参加过地方培训' : '   未参加地方培训'" type="" name=""
                                       id="" value="" class="remove-input-class" disabled="disabled"/>
                            </td>
                        </tr>
                        <tr>

                            <td colspan="2" >
                                <input th:value="'参加地方培训次数：' + ${user.localTrainingTimes} +' 次'" type="" name="" id="" value="" class="remove-input-class" disabled="disabled"/>
                            </td>
                        </tr>
                        <tr>
                            <td>国家培训</td>
                            <td colspan="2" th:text="${user != null}?${user.nationalTrainingDescription}"></td>
                        </tr>
                        <tr>
                            <td>获得证书情况</td>
							<td colspan="4" >
								<span th:each="certificate:${user.certificates}" th:text="${certificate != null}?${certificate.certificateName} + '&nbsp;'"></span>
							</td>
                        </tr>
                        <tr>
                            <td>认定情况</td>
                            <td colspan="4" th:text="${user.identification}"></td>
                        </tr>
                        <tr>
                            <td colspan="2">类型</td>
                            <td colspan="3" th:text="${user.typeChange}"></td>
                        </tr>


                        </tbody>

                    </table>
                    <table class="layui-table layui-form" style="margin-top: -6px;">

                        <tbody th:if="${checkUser} != null" th:with="user=${checkUser}">
                        <tr>
                            <td rowspan="10">农业生产经营和服务基本情况</td>
                            <td>产业所在地</td>
                            <td colspan="7"
                                th:text="${user.industryBaseInfo !=null} ?${user.industryBaseInfo.industryDirection}"></td>

                        </tr>
                        <tr>
                            <td colspan="9">主体产业</td>
                        </tr>
                        <tr th:each="industry : ${user.industryBaseInfo.industries}">
                            <td th:text="'主体产业'+${industryStat.index + 1}">主体产业1</td>
                            <td th:text="${industry.industryType}">粮油类</td>
                            <td>产业名称</td>
                            <td th:text="${industry.industryName}"></td>
                            <td>产业规模</td>
                            <td th:text="${industry.industryScale}"></td>
                            <td>从事年限</td>
                            <td th:text="${industry.year}">年</td>
                        </tr>

                        <tr>
                            <td colspan="4">上年度产业收入(万元)</td>
                            <td colspan="4" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.incomeOfLastYear}"></td>
                        </tr>
                        <tr>
                            <td rowspan="4">家庭农场情况</td>
                            <td>是否登记注册</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.isRegister()?'是':'否'}"></td>
                            <td>示范性家庭农场</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.isExemplaryFarm()?'是':'否'}"></td>
                        </tr>
                        <tr>
                            <td>家庭农场类型</td>
                            <td colspan="6" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.farmType}"></td>
                        </tr>
                        <tr>
                            <td>土地经营规模(亩)</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.landManagementScale}"></td>
                            <td>家庭总人口</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.population}"></td>
                        </tr>
                        <tr>
                            <td>家庭从事产业人数</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.engagedNum}"></td>
                            <td>上年度家庭收入(万元)</td>
                            <td colspan="3" th:text="${user.industryBaseInfo.familyFarmInfo !=null}?${user.industryBaseInfo.familyFarmInfo.incomeOfLastYear}"></td>
                        </tr>
                        <tr>
                            <td rowspan="3">产业生产经营和服务基本情况</td>
                            <td>工作地点</td>
                            <td colspan="8" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.workAddress}"></td>
                        </tr>
                        <tr>
                            <td>服务对象</td>
                            <td colspan="3" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.serviceTarget}"></td>
                            <td>从业年限</td>
                            <td colspan="3" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.year}"></td>
                        </tr>
                        <tr>
                            <td>服务规模(个数)</td>
                            <td colspan="3" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.serviceCount}"></td>
                            <td>年收入(万元)</td>
                            <td colspan="3" th:text="${user.industryBaseInfo !=null}?${user.industryBaseInfo.income}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['laydate', 'form'],
        function () {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });


    /*用户-删除*/
    function member_del(obj, id) {
        layer.confirm('确认要删除吗？',
            function (index) {
                //发异步删除数据
                $(obj).parents("tr").remove();
                layer.msg('已删除!', {
                    icon: 1,
                    time: 1000
                });
            });
    }

    function delAll(argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要删除吗？' + data,
            function (index) {
                //捉到所有被选中的，发异步进行删除
                layer.msg('删除成功', {
                    icon: 1
                });
                $(".layui-form-checked").not('.header').parents('tr').remove();
            });
    }
</script>
</html>
